//
//  NoticeViewController.m
//  掌上海印
//
//  Created by 陈德锋 on 16/4/18.
//  Copyright © 2016年 handsome. All rights reserved.
//

#import "NoticeViewController.h"

@interface NoticeViewController ()
@property(nonatomic, strong) UIScrollView *scroll;

@end

@implementation NoticeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
     self.view.backgroundColor = bgColor;
    NSLog(@"-----------%@",_inderow.content);
    // Do any additional setup after loading the view.
}

-(void) loadView{

    [super loadView];
    _scroll = [[UIScrollView alloc]init];
    _scroll.frame = CGRectMake(0, 0, [[UIScreen mainScreen]bounds].size.width, [[UIScreen mainScreen]bounds].size.height);
    _scroll.contentSize = CGSizeMake(self.view.frame.size.width, [[UIScreen mainScreen]bounds].size.height*1.5);

    [self.view addSubview:_scroll];
    
    _Title = [[UILabel alloc]init];
    _Title.text = _inderow.title;
    _Title.frame = CGRectMake(10, 15, [[UIScreen mainScreen]bounds].size.width-20, 60);
    _Title.font = [UIFont systemFontOfSize:22.0];
    [_scroll addSubview: _Title];
    
    _Time = [[UILabel alloc]init];
    _Time.text = _inderow.time;
    _Time.frame = CGRectMake(10, 85, 90, 15);
    _Time.font = [UIFont systemFontOfSize:12.0];
    _Time.textColor= [UIColor grayColor];
    [_scroll addSubview: _Time];
    
    _Depetment = [[UILabel alloc]init];
    _Depetment.text = _inderow.depetment;
    _Depetment.frame = CGRectMake(110, 85, 90, 15);
    _Depetment.font = [UIFont systemFontOfSize:12.0];
    _Depetment.textColor= [UIColor grayColor];
    [_scroll addSubview: _Depetment];
    
    _Image = [[UIImageView alloc] init];
    _Image.image = [UIImage imageNamed:_inderow.noticeImage];
    _Image.frame = CGRectMake(10, 120, [[UIScreen mainScreen]bounds].size.width-20, [[UIScreen mainScreen]bounds].size.width-100);
    [_scroll addSubview: _Image];

    
    _content = [[UITextView alloc]init];
    _content.text = _inderow.content;
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    paragraphStyle.lineSpacing = 20;
    _content.font = [UIFont systemFontOfSize:22.0];
    _content.frame = CGRectMake(10, 420, [[UIScreen mainScreen]bounds].size.width-20, [[UIScreen mainScreen]bounds].size.height*1.5-[[UIScreen mainScreen]bounds].size.width+100);
    [_scroll addSubview: _content];

    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
